﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace InsuranceAdjuster.OccasionallyConnected.Messages
{
    public class MessageResult
    {
        public Verb Verb { get; set; }
        public Guid EntityGuid { get; set; }
        public IEntity Entity { get; set; }
        public Boolean BroadcastResult { get; set; }
        public Origin Origin { get; set; }

        public MessageResult(Verb verb, Origin origin, Guid entityGuid)
            : this(verb, origin, entityGuid, null)
        {
        }
        public MessageResult(Verb verb, Origin origin, IEntity entity)
            : this(verb, origin, entity.EntityGuid, entity)
        {
        }
        public MessageResult(Verb verb, Origin origin, Guid entityGuid, IEntity entity, Boolean broadcastResult = true)
        {
            Verb = verb;
            EntityGuid = entityGuid;
            Entity = entity;
            Origin = origin;
            BroadcastResult = broadcastResult;
        }

    }

    public enum Origin {
        Cache = 0,
        Server = 1,
    }
}
